package com.manage.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * 
 * @TableName vw_user_role_details
 */
@TableName(value ="vw_user_role_details")
@Data
public class VwUserRoleDetails {
    /**
     * 用户身份ID
     */
    private Integer userRoleId;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 真实姓名
     */
    private String userName;

    /**
     * 部门名称
     */
    private String departmentName;

    /**
     * 职位名
     */
    private String positionTitle;

    /**
     * 
     */
    private String parentDepartment;

    /**
     * 
     */
    private String userStatus;

    private String parentPositionTitle;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        VwUserRoleDetails other = (VwUserRoleDetails) that;
        return (this.getUserRoleId() == null ? other.getUserRoleId() == null : this.getUserRoleId().equals(other.getUserRoleId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
            && (this.getDepartmentName() == null ? other.getDepartmentName() == null : this.getDepartmentName().equals(other.getDepartmentName()))
            && (this.getPositionTitle() == null ? other.getPositionTitle() == null : this.getPositionTitle().equals(other.getPositionTitle()))
            && (this.getParentDepartment() == null ? other.getParentDepartment() == null : this.getParentDepartment().equals(other.getParentDepartment()))
            && (this.getUserStatus() == null ? other.getUserStatus() == null : this.getUserStatus().equals(other.getUserStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUserRoleId() == null) ? 0 : getUserRoleId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getDepartmentName() == null) ? 0 : getDepartmentName().hashCode());
        result = prime * result + ((getPositionTitle() == null) ? 0 : getPositionTitle().hashCode());
        result = prime * result + ((getParentDepartment() == null) ? 0 : getParentDepartment().hashCode());
        result = prime * result + ((getUserStatus() == null) ? 0 : getUserStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userRoleId=").append(userRoleId);
        sb.append(", userId=").append(userId);
        sb.append(", userName=").append(userName);
        sb.append(", departmentName=").append(departmentName);
        sb.append(", positionTitle=").append(positionTitle);
        sb.append(", parentDepartment=").append(parentDepartment);
        sb.append(", userStatus=").append(userStatus);
        sb.append("]");
        return sb.toString();
    }
}